package com.showsu.editor.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * @Author: William
 * @Description: 短信模版枚举
 * @Date: Created in 8:33 下午 2023/3/20
 * @Modified By:
 */
@Getter
@AllArgsConstructor
public enum SMSTemplateEnum {

    SHOWSU_EDITOR_LOGIN(0, "SMS_461080509", "数秀科技", "红薯秀编辑器登陆短信"),
    REMOTE_INTERFACE_ERROR(1, "SMS_464850715", "抖达人", "外部数据接口调用异常通知"),
    ;

    /**
     * 编码
     */
    final int code;

    /**
     * 阿里云短信模版编码
     */
    final String aliyunTemplatCode;

    /**
     * 短信签名
     */
    final String signature;

    /**
     * 描述
     */
    final String desc;

    public static SMSTemplateEnum getByCode(int code) {
        for (SMSTemplateEnum smsTemplateEnum : SMSTemplateEnum.values()) {
            if (smsTemplateEnum.getCode() == code) {
                return smsTemplateEnum;
            }
        }
        return null;
    }
}
